package com.zrrd.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;


@Schema(name = "UserUpdatePhoneParam", description = "用于用户修改手机号的Param实体参数")
@Data
public class UserUpdatePhoneParam implements Serializable {

    @Schema(description = "用户表主键", required = true, example = "1")
    @NotNull(message = "修改业务中主键不能为空")
    private Integer id;

    @Schema(description = "用户新手机", required = true, example = "18210210111")
    @Pattern(regexp = "^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}$", message = "修改业务中手机号码格式不正确")
    private String phone;
}
